﻿using NodeCanvas.Framework;
using ParadoxNotion.Design;
using Yoozoo.Gameplay.Liberty.World;

namespace Yoozoo.Gameplay.Liberty.AI.Node
{
    [Category("Ggame/Liberty")]
    public class PathFrontCrowd : AIConditionBaseNode
    {
        public BBParameter<float> distance = 12f;
        public BBParameter<int> number = 3;

        protected override bool OnCheck()
        {
            var pathState = WorldState.Ws.GetNpcPathState(_entity.data.pathId);
            if (pathState && pathState.FrontCrowd(_entity.data.uniqueId,distance.value,number.value))
            {
                return true;
            }
            return false;
        }
    }
}